Conventionally, as illustrated in FIG. 1, the howling control apparatus of this type included an input terminal 1008, a band dividing section 1001, a band level calculating section 1002, a band level average value calculating section 1003, a howling detecting section 1004, a gain control section 1005, a howling suppressing section 1006, a band combining section 1007, and an output terminal 1009.
The band dividing section 1001 provides one frame (frame length: approximately 10 to 100 ms) buffering to an output signal of a microphone amplifier input to the input terminal 1008 and that of an AD converter and the like and divides a time signal x(t) into signals (band division signals) xi(t) of a predetermined number (for example, M, M is a positive integer) of frequency bands in a frame unit (i is a positive integer including 0 to M-1 and called band number)by a method such as a polyphase filter, a Fast Fourier Transform (FFT), or a bandpass filter and the like. The following processing is independently performed for each of M band division signals in a frame unit.
The band level calculating section 1002 calculates each level Li(t) such as each band power or amplitude using band division signals xi(t) subjected to the band division by the band dividing section 1001.
The band level average value calculating section 1003 adds the respective M band levels Li(t) and performs division by the number of added bands (M) to calculate a band level average value Lave(t).
The howling detecting section 1004 performs processing as illustrated in a flowchart of FIG. 2 to set a value to a howling detection flag dtct_flg-i of each band vision signal.
First of all, in order to check whether howling is being suppressed currently, the value of howling detection flag dtct_flg-i is confirmed (S1001). When the value of howling detection flag dtct_flg-i is 0x0000 (0xnnnn indicates that nnnn is a hexadecimal number), it is judged that no howling is being suppressed currently and determination on howling is performed.
Next, a level ratio Ri(t) is calculated according to the following equation using the band level Li(t) and the band level average Lave(t) (S1002):Ri(t)=Li(t)/Lave(t)
Sequentially, comparison between a level ratio Ri(t) and a level ratio threshold Th_R is performed (S1003). When Ri(t)>Th_R as a result of comparison, a value of a howling detection counter dtct_cnt-i is compared with a count threshold Th_cnt (S1004).
When dtct_cnt-i>Th_cnt, a band level average value Lave(t) of a current frame is substituted into a reference level Lref-i(t) (S1005), and the value of howling detection flag dtct_flg-i is set to 0xffff (S1006).
When dtct_cnt-i≦Th_cnt, the value of counter dtct_cnt-i is incremented by one (S1007).
When Ri(t)≦Th_R as a result of comparison in S1003, the value of counter dtct_cnt-i is reset to ‘0’ (S1008).
The gain control section 1005 sets a gain Gi(t) by processing as illustrated in a flowchart of FIG. 3.
First of all, it is checked whether howling is detected with reference to the howling detection flag dtct_flg-i (S1011). When dtct_flg-i=0xffff, the gain Gi(t) is updated according to the following equation in order to suppress the howling (S1012):Gi(t)=Gi(t−1)×Gdown
where Gdown is an update quantity for reducing the gain and a value of 0<Gdown<1is obtained.
Next, a ratio between the band level Li(t) and the reference level Lref-i(t) is compared with a gain control threshold Th_Ctrl_gain (S1013). When Li(t)/Lref-i(t)<Th_Ctrl_gain, since it is judged that occurrence of howling is stopped, the value of howling detection flag dtct_flg-i is set to 0x0000 in order to shift processing to processing for returning the gain Gi(t) to ‘1’ (S1014).
When the howling detection flag dtct_flg-i=0x0000 as a result of the comparison in S1011, since no howling occurs, if the gain Gi(t) is under 1, the gain Gi(t) is updated according to the following equation in order to return the gain to one time (S1015).Gi(t)=Gi(t−1)×Gup
where Gup is an update quantity for increasing the gain and a value of Gup>1 is obtained.
The howling suppressing section 1006 multiplies the band division signals xi(t) subjected to band division by the band dividing section 1001 by the gain Gi(t) set by the gain control section 1005 to obtain yi(t) according to the following equation:yi(t)=xi(t)×Gi(t)
The band combining section 1007 calculates a time signal y(t) using the above yi(t) by a method corresponding to the band division method such as a polyphase filter, an FFT, and the like performed by the band dividing section 1001.
However, in such the conventional howling control apparatus, since a consideration of whether there is a situation in which howling easily occurs is not given at the time of canceling the suppression of howling, there is a problem in which the suppression of howling is cancelled though a situation in which howling easily occurs continues since, for example, much time is taken to attach a hearing aid, with the result that occurrence of howling→suppression→cancellation→occurrence→suppression→cancellation→ . . . are repeated, resulting in a grating sound.